package com.semidata.trp.algorithm.job;

import com.semidata.rtd.core.http.server.HttpSession;
import com.semidata.rtd.core.job.JobContext;
import com.semidata.trp.algorithm.request.StrategyContext;

public class AlgorithmJobContext implements JobContext{
	private HttpSession httpSession;
	private String code;
	private Double result;
	private StrategyContext args;
	private Class<?> algorithm;
	public AlgorithmJobContext() {
		
	}
	public void setResult(Double result) {
		this.result = result;
	}
	public Double getResult() {
		return this.result;
	}
	public void setAlgorithm(Class<?> algorithm) {
		this.algorithm = algorithm;
	}
	public Class<?> getAlgorithm(){
		return this.algorithm;
	}
	public HttpSession getHttpSession() {
		return httpSession;
	}
	public void setHttpSession(HttpSession session) {
		this.httpSession = session;
	}
	public String getCode() {
		return code;
	}
	public void setCode(String code) {
		this.code = code;
	}
	public StrategyContext getArgs() {
		return args;
	}
	public void setArgs(StrategyContext args) {
		this.args = args;
	}
	
	public String getLog() {
		if (args != null)
			return this.args.getLog();
		return "";
	}
	
}
